#ifndef BILET_H
#define BILET_H
#include <QWidget>
class Bilet : public QWidget
{
    Q_OBJECT
    Q_PROPERTY(QString text READ text WRITE setText)
public:
    Bilet(QWidget *parent = 0);
    void setText(const QString &newText);
    QString text() const { return myText;}
    QSize sizeHint() const;
protected:
    void paintEvent(QPaintEvent *event);
    void timerEvent(QTimerEvent *event);
    void showEvent(QShowEvent *event);
    void hideEvent(QHideEvent *event);
private:
    QString myText;
    int offset;
    int myTimerId;
public slots:
    void change(int k);
};

#endif // BILET_H
